package cn.com.yusys.yusp.message.domain;

import cn.com.yusys.yusp.commons.mapper.domain.BaseDomain;
import java.io.Serializable;
import javax.persistence.*;

@Table(name = "MESSAGE_POOL_HIS")
public class MessagePoolHis extends BaseDomain implements Serializable {
    @Id
    @Column(name = "PK_NO")
    private String pkNo;

    @Column(name = "EVENT_NO")
    private String eventNo;

    @Column(name = "CHANNEL_TYPE")
    private String channelType;

    @Column(name = "USER_NO")
    private String userNo;

    @Column(name = "CREATE_TIME")
    private String createTime;

    @Column(name = "SEND_TIME")
    private String sendTime;

    @Column(name = "MESSAGE_LEVEL")
    private String messageLevel;

    @Column(name = "STATE")
    private String state;

    @Column(name = "TIME_START")
    private String timeStart;
    
    @Column(name = "TIME_END")
    private String timeEnd;

    @Column(name = "PK_HASH")
    private Integer pkHash;

    @Column(name = "MESSAGE_TYPE")
    private String messageType;
    
    /**
     * @return MESSAGE_TYPE
     */
    public String getMessageType() {
        return messageType;
    }

    /**
     * @param messageType
     */
    public void setMessageType(String messageType) {
        this.messageType = messageType == null ? null : messageType.trim();
    }
    
    private static final long serialVersionUID = 1L;

    /**
     * @return PK_NO
     */
    public String getPkNo() {
        return pkNo;
    }

    /**
     * @param pkNo
     */
    public void setPkNo(String pkNo) {
        this.pkNo = pkNo == null ? null : pkNo.trim();
    }

    /**
     * @return EVENT_NO
     */
    public String getEventNo() {
        return eventNo;
    }

    /**
     * @param eventNo
     */
    public void setEventNo(String eventNo) {
        this.eventNo = eventNo == null ? null : eventNo.trim();
    }

    /**
     * @return CHANNEL_TYPE
     */
    public String getChannelType() {
        return channelType;
    }

    /**
     * @param channelType
     */
    public void setChannelType(String channelType) {
        this.channelType = channelType == null ? null : channelType.trim();
    }

    /**
     * @return USER_NO
     */
    public String getUserNo() {
        return userNo;
    }

    /**
     * @param userNo
     */
    public void setUserNo(String userNo) {
        this.userNo = userNo == null ? null : userNo.trim();
    }

    /**
     * @return CREATE_TIME
     */
    public String getCreateTime() {
        return createTime;
    }

    /**
     * @param createTime
     */
    public void setCreateTime(String createTime) {
        this.createTime = createTime == null ? null : createTime.trim();
    }

    /**
     * @return SEND_TIME
     */
    public String getSendTime() {
        return sendTime;
    }

    /**
     * @param sendTime
     */
    public void setSendTime(String sendTime) {
        this.sendTime = sendTime == null ? null : sendTime.trim();
    }

    /**
     * @return MESSAGE_LEVEL
     */
    public String getMessageLevel() {
        return messageLevel;
    }

    /**
     * @param messageLevel
     */
    public void setMessageLevel(String messageLevel) {
        this.messageLevel = messageLevel == null ? null : messageLevel.trim();
    }

    /**
     * @return STATE
     */
    public String getState() {
        return state;
    }

    /**
     * @param state
     */
    public void setState(String state) {
        this.state = state == null ? null : state.trim();
    }

    /**
     * @return TIME_START
     */
    public String getTimeStart() {
        return timeStart;
    }

    /**
     * @param timeStart
     */
    public void setTimeStart(String timeStart) {
        this.timeStart = timeStart == null ? null : timeStart.trim();
    }
    
    /**
     * @return TIME_END
     */
    public String getTimeEnd() {
        return timeEnd;
    }

    /**
     * @param timeEnd
     */
    public void setTimeEnd(String timeEnd) {
        this.timeEnd = timeEnd == null ? null : timeEnd.trim();
    }

    /**
     * @return PK_HASH
     */
    public Integer getPkHash() {
        return pkHash;
    }

    /**
     * @param pkHash
     */
    public void setPkHash(Integer pkHash) {
        this.pkHash = pkHash;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        MessagePoolHis other = (MessagePoolHis) that;
        return (this.getPkNo() == null ? other.getPkNo() == null : this.getPkNo().equals(other.getPkNo()))
            && (this.getEventNo() == null ? other.getEventNo() == null : this.getEventNo().equals(other.getEventNo()))
            && (this.getChannelType() == null ? other.getChannelType() == null : this.getChannelType().equals(other.getChannelType()))
            && (this.getUserNo() == null ? other.getUserNo() == null : this.getUserNo().equals(other.getUserNo()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getSendTime() == null ? other.getSendTime() == null : this.getSendTime().equals(other.getSendTime()))
            && (this.getMessageLevel() == null ? other.getMessageLevel() == null : this.getMessageLevel().equals(other.getMessageLevel()))
            && (this.getState() == null ? other.getState() == null : this.getState().equals(other.getState()))
            && (this.getTimeStart() == null ? other.getTimeStart() == null : this.getTimeStart().equals(other.getTimeStart()))
            && (this.getPkHash() == null ? other.getPkHash() == null : this.getPkHash().equals(other.getPkHash()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getPkNo() == null) ? 0 : getPkNo().hashCode());
        result = prime * result + ((getEventNo() == null) ? 0 : getEventNo().hashCode());
        result = prime * result + ((getChannelType() == null) ? 0 : getChannelType().hashCode());
        result = prime * result + ((getUserNo() == null) ? 0 : getUserNo().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getSendTime() == null) ? 0 : getSendTime().hashCode());
        result = prime * result + ((getMessageLevel() == null) ? 0 : getMessageLevel().hashCode());
        result = prime * result + ((getState() == null) ? 0 : getState().hashCode());
        result = prime * result + ((getTimeStart() == null) ? 0 : getTimeStart().hashCode());
        result = prime * result + ((getPkHash() == null) ? 0 : getPkHash().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", pkNo=").append(pkNo);
        sb.append(", eventNo=").append(eventNo);
        sb.append(", channelType=").append(channelType);
        sb.append(", userNo=").append(userNo);
        sb.append(", createTime=").append(createTime);
        sb.append(", sendTime=").append(sendTime);
        sb.append(", messageLevel=").append(messageLevel);
        sb.append(", state=").append(state);
        sb.append(", timeStart=").append(timeStart);
        sb.append(", pkHash=").append(pkHash);
        sb.append("]");
        return sb.toString();
    }
}